import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:practice_app/router/app_router.dart';

import 'logic.dart';

class LoginPage extends StatelessWidget {

  final logic = Get.put(LoginLogic());
  final state = Get.find<LoginLogic>().state;

  @override
  Widget build(BuildContext context) {

    return Scaffold(
      appBar: AppBar(
        title:Text('登录'),
      ),
      body: SingleChildScrollView(
        child: Column(
          children: [
            ElevatedButton(
              onPressed: () {
                Get.offAllNamed(AppRoutes.Main);
              },
              child: Text('登录'),
            )
          ],
        ),
      ),
    );
  }
}
